'use strict';

const Controller = require('egg').Controller;

class ListController extends Controller {
  async index() {
      const { ctx } = this;
      const db = this.app.mongodb;
      const res = await db.collection("city").find().toArray();
      ctx.body = {
          status: 200,
          msg: "城市数据",
          res
      }
  }
}

module.exports = ListController;
